1. Field of the Invention
The present invention relates to an image processing apparatus, a printing apparatus and an image processing method capable of performing at high speed an image data quantization using an error diffusion method.
2. Description of the Related Art
With rapid advances and development of integrated circuit fabrication technologies and information communication technologies under way, information devices, such as personal computers and digital cameras, have come into wide use in offices and homes and their performances have significantly improved. As these information devices spread, demands for the printing apparatus as output devices are steadily increasing. Especially, an ink jet printing apparatus that prints images using droplets of a plurality of color inks are currently being used in a wide range of industrial fields and also in homes. Recent years have seen significant advances in ink jet printing technologies, which in turn has resulted in development of printing apparatus capable of outputting highly defined color images, such as color photographs, and ones capable of printing on large-size print media with a width as large as A0 or B0.
An ink jet printing apparatus forms an image by ejecting fine droplets of different color inks from a large number of fine openings (ejection openings constituting nozzles) formed in a print head. In a so-called serial scan type ink jet printing apparatus, the image forming on a print medium involves reciprocally moving the print head in a main scan direction at a position facing the print medium and moving the print medium in a direction crossing the main scan direction. A plurality of nozzles are arrayed in a direction crossing the main scan direction to form a nozzle array. Ink tanks amounted in the printing apparatus contain various color inks, which are supplied to the print head for ejection from the nozzles.
Image data for each ink color handled by the ink jet printing apparatus is binary data that indicates whether or not an ink droplet should be ejected for each pixel. On the other hand, image data for each ink color handled by a host device such as a computer, that instructs the printing apparatus to perform printing, is greater gradation image date. For example, the greater gradation image data is 8- or 10-bit data representing 256 or 1024 gradation values. Thus, for the ink jet printing apparatus to perform printing, the greater gradation image data needs to be converted into binary image data. In other words, quantization processing must be done.
Widely known quantization processing includes an error diffusion method and a dither method. The error diffusion method compares, for each pixel, a pixel value and a threshold and distributes quantization errors caused by the quantization processing to unprocessed neighboring pixels. Since it also saves the densities of an entire image during the quantization processing, the error diffusion method is capable of good pseudo-gradation representation.
In an ink jet printing apparatus of a serial scan type, when the error diffusion-based quantization processing is performed on image data, one line of pixels to be printed by the print head as it moves in the main scan direction is subjected to the quantization processing beginning with a pixel at one end of the line and proceeding toward a pixel at the other end. After one line of pixels has been quantized, the next line of pixels adjoining the first line in the subscan direction is similarly subjected to the quantization processing. This process is repeated until image data of the entire image is quantized. Quantization errors that occur during the quantization processing may be distributed to other pixels on the same line as the pixel being quantized or to those on lines adjoining the line of interest in the subscan direction. For example, as shown in FIG. 12, those pixels, to which the quantization errors of the pixel P currently being quantized are to be spread, can be chosen from all or part of unprocessed pixels A, B, H, I on the same line L1 as the pixel of interest P and from pixels C, D, E, F, G on the adjacent line L2. In that case, the error data to be distributed to the pixels on the same line L1 are temporarily stored in a buffer in an error diffusion circuit until these pixels are processed. The error data to be distributed to the pixels on the adjoining line L2 are all stored in an error memory and, when the adjoining line L2 is subjected to the quantization processing, are read out from the error memory for the processing of pixels on the adjoining line L2.
The image data handled by the printing apparatus has increased in volume over the past years because of an enhanced resolution of printed images and an increase in size of the print paper. Further, enhanced functions of a printer engine and an increased size of a print head in the printing apparatus have contributed to the realization of faster printing speeds. All this in turn calls for a capability of processing a large volume of print data at faster speed and especially makes it necessary to increase the speed at which the error diffusion-based quantization processing is performed.
Japanese Patent Laid-Open No. 2001-285633 discloses an image processing apparatus which, in writing error data in an error memory, reduces the number of memory accesses by reducing the number of bits in the error data according to a function approximating a sigmoid function.
With the above conventional image processing apparatus, however, the original error data cannot be recovered from the modified error data with a reduced number of bits, giving rise to a problem of degraded image quality.